<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>向量库操作系统</title>
    <link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
    <header>
        <h1>向量库操作系统</h1>
        <p>文件管理、向量库和检索系统</p>
    </header>
    
    <nav class="navbar">
        <a href="/" class="active">首页</a>
        <a href="/files">文件管理</a>
        <a href="/search">内容检索</a>
        <a href="/stats">系统统计</a>
        <a href="/docs">API文档</a>
    </nav>
    
    <div class="container">
        <div class="stats-grid">
            <div class="stat-card">
                <div class="stat-value" id="total-files">0</div>
                <div class="stat-label">总文件数</div>
            </div>
            <div class="stat-card">
                <div class="stat-value" id="processed-files">0</div>
                <div class="stat-label">已处理文件</div>
            </div>
            <div class="stat-card">
                <div class="stat-value" id="failed-files">0</div>
                <div class="stat-label">处理失败</div>
            </div>
            <div class="stat-card">
                <div class="stat-value" id="total-vectors">0</div>
                <div class="stat-label">向量块数</div>
            </div>
        </div>
        
        <div class="card">
            <div class="card-header">
                <h2>文件上传</h2>
            </div>
            <form id="upload-form" enctype="multipart/form-data">
                <div class="drop-zone" id="drop-zone">
                    <p>拖拽文件到此处上传，或点击选择文件</p>
                    <input type="file" id="file" name="file" class="hidden">
                </div>
                <div id="upload-progress" class="hidden">
                    <p>文件上传中...</p>
                </div>
                <button type="submit" class="btn btn-block">上传文件</button>
            </form>
        </div>
        
        <div class="card">
            <div class="card-header">
                <h2>快速检索</h2>
            </div>
            <form id="search-form">
                <div class="form-group">
                    <label for="search-query">检索内容</label>
                    <input type="text" id="search-query" name="query" placeholder="输入要检索的内容...">
                </div>
                <div id="search-progress" class="hidden">
                    <p>检索中...</p>
                </div>
                <button type="submit" class="btn btn-block">开始检索</button>
            </form>
            
            <div class="search-results" id="search-results">
                <!-- 检索结果将在这里显示 -->
            </div>
        </div>
        
        <div class="card">
            <div class="card-header">
                <h2>最近搜索</h2>
            </div>
            <ul class="search-history-list" id="search-history-list">
                <!-- 搜索历史将在这里显示 -->
                <li>加载中...</li>
            </ul>
        </div>
    </div>
    
    <script src="/static/js/main.js"></script>
</body>
</html>